package com.hd.entity.personaloffice;

import com.hd.entity.Attach;

import javax.persistence.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author: hzhh123
 * @Date: 2018/12/24 22:17
 * 工作计划
 */
@Entity
@Table(name = "office_work_plan")
public class WorkPlan implements Serializable{
    @Id
    private String id;
    /**
     * 工作计划标题
     */
    @Column(name = "name")
    private String name;
    /**
     * 计划人
     */
    @Column(name="user_id")
    private String userid;
    /**
     * 计划人姓名
     */
    @Transient
    private String userName;
    /**
     * 计划内容
     */
    @Column(name = "content",columnDefinition = "TEXT")
    private String content;
    /**
     * 计划类型
     * type=0(日计划)
     * type=1(周计划)
     * type=2(月计划)
     * type=3(季度计划)
     * type=4(年度计划)
     */
    @Column(name = "type")
    private Integer type;
    /**
     * 计划所属：如个人计划、部门计划、公司计划
     */
    @Column(name = "plan_belong_to")
    private String planBelongTo;
    /**
     * 操作时间时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "operate_time")
    private Date operateTime;
    /**
     * 保存日期
     */
    @Temporal(TemporalType.DATE)
    @Column(name = "save_date")
    private Date saveDate;
    @Transient
    private Date saveDateStart;
    @Transient
    private Date saveDateEnd;
    /**
     * 最近修改日期
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "last_update_time")
    private Date lastUpdateTime;
    /**
     * 附件
     */
    @Column(name = "attach_ids",columnDefinition = "TEXT")
    private String attachIds;
    @Transient
    private List<Attach> attachList=new ArrayList<>();
    /**
     * 评论人
     */
    @Column(name = "commentators",columnDefinition = "TEXT")
    private String commentators;
    @Transient
    private String commentatorNames;
    /**
     * 评论
     */
    @Transient
    private List<WorkCommentOpinion>workCommentOpinionList=new ArrayList<>();
    /**
     * 抄送人
     */
    @Column(name = "user_id_ccs",columnDefinition = "TEXT")
    private String useridCcs;
    @Transient
    private String userNameCcs;
    /**
     * 状态 1-启用 0-作废
     */
    @Column(columnDefinition = "int default 1")
    private Integer status=1;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getPlanBelongTo() {
        return planBelongTo;
    }

    public void setPlanBelongTo(String planBelongTo) {
        this.planBelongTo = planBelongTo;
    }

    public Date getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(Date operateTime) {
        this.operateTime = operateTime;
    }

    public Date getSaveDate() {
        return saveDate;
    }

    public void setSaveDate(Date saveDate) {
        this.saveDate = saveDate;
    }

    public Date getSaveDateStart() {
        return saveDateStart;
    }

    public void setSaveDateStart(Date saveDateStart) {
        this.saveDateStart = saveDateStart;
    }

    public Date getSaveDateEnd() {
        return saveDateEnd;
    }

    public void setSaveDateEnd(Date saveDateEnd) {
        this.saveDateEnd = saveDateEnd;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public String getAttachIds() {
        return attachIds;
    }

    public void setAttachIds(String attachIds) {
        this.attachIds = attachIds;
    }

    public List<Attach> getAttachList() {
        return attachList;
    }

    public void setAttachList(List<Attach> attachList) {
        this.attachList = attachList;
    }

    public String getCommentators() {
        return commentators;
    }

    public void setCommentators(String commentators) {
        this.commentators = commentators;
    }

    public String getCommentatorNames() {
        return commentatorNames;
    }

    public void setCommentatorNames(String commentatorNames) {
        this.commentatorNames = commentatorNames;
    }

    public List<WorkCommentOpinion> getWorkCommentOpinionList() {
        return workCommentOpinionList;
    }

    public void setWorkCommentOpinionList(List<WorkCommentOpinion> workCommentOpinionList) {
        this.workCommentOpinionList = workCommentOpinionList;
    }

    public String getUseridCcs() {
        return useridCcs;
    }

    public void setUseridCcs(String useridCcs) {
        this.useridCcs = useridCcs;
    }

    public String getUserNameCcs() {
        return userNameCcs;
    }

    public void setUserNameCcs(String userNameCcs) {
        this.userNameCcs = userNameCcs;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

}
